Release 10.1A: OpenEdge Development:
Progress Dynamics Administration


Creating a batch-mode DCU script

Write a batch command file or script that executes the two DCU batch procedures, dcuphase1.p and dcuphase2.p, in sequence. Progress Dynamics provides a sample batch command file for you to use as a model (see the "Sample batch-mode DCU script" section).

Both procedures start a complete Dynamics session in order to complete the installation or upgrade of the target Repository. They connect to the target site Repository as necessary and write details of their activity to the log file you specify in the DCU GUI. Each procedure returns a value to the calling script indicating success or failure.

Like any Dynamics session, these procedures require configuration files (-icfparam ICFCONFIG) and session types (-icfparam ICFSESSTYPE) to work. You generate the appropriate configuration files, and Progress Dynamics provides a default session type for each procedure that supports batch clients.

You must also use the -ini startup parameter, like the following for each procedure, to specify a .ini file that sets the PROPATH for the batch-mode DCU:

[Winchar Startup] 
PROPATH=.,OpenEdge_Install\tty\dynamics,OpenEdge_Install\src\dynamics,OpenEd
ge_Install\src\dynamics\af\sup2,OpenEdge_Install\tty, 
OpenEdge_Install\tty\adedict.pl,OpenEdge_Install\tty\prodict.pl,OpenEdge_Ins
tall\oebuild,OpenEdge_Install\oebuild\make 

Note: These procedures are installed in OpenEdge_Install\src\dynamics.

Starting up dcuphase1.p

The dcuphase1.p procedure updates the Repository schema and runs various fix programs to prepare for loading the installation or upgrade data. To start up dcuphase1.p, use a command line like the following:

bpro -p dcuphase1.p -ini dcubatch.ini -pf dcuphase1.pf 

The dcubatch.ini file is typically an edited copy of your dynamics.ini file that you use to set the PROPATH appropriately for the batch-mode DCU. You must use a .pf file (dcuphase1.pf in the example) to specify the -icfparam options for the Dynamics session. (The batch character process in Windows does not accept the -icfparam startup parameter specified directly on the command line.) For dcuphase1.p, you specify the same DCU XML files for input using the -icfparam options that you specified to generate these files using the DCU GUI (see the "Generating the batch-mode data" section). For example, you might specify this -icfparam setting in a.pf file, as shown:

-icfparam DCUSCRIPTFILE=dcuscript.xml,DCUSITEDATAFILE=site42.xml 

The DCU script file provides all of the environment settings as you specified them in the DCU GUI. If you do not specify the DCUSITEDATAFILE option, the procedure assumes that the necessary site data is included in the DCU script file.

Note also that dcuphase1.p looks for dcuphase1.xml as the default ICFCONFIG setting, which you generate as a configuration file from your central Repository, and it uses dcuphase1 as the default ICFSESSTYPE setting, a session type that supports batch clients.

Starting up dcuphase2.p

Start up this procedure only if dcuphase1.p completes successfully. This procedure makes a connection to the Repository to load the actual installation or upgrade data. To start up dcuphase2.p, use a command line similar to starting up a Progress Dynamics session in the AppServer environment, except you must specify a session type that supports batch clients, and you must use a .pf file to specify the -icfparam settings, like the following:

bpro -p dcuphase2.p -ini dcubatch.ini -pf dcuphase2.pf 

Again, you use a .ini (dcubatch.ini) file to set the PROPATH appropriately for the batch-mode DCU.

The dcuphase2.pf file might contain the following settings:

-icfparam ICFCONFIG=icfconfig.xml,ICFSESSTYPE=dcuphase2 

Progress Dynamics provides the dcuphase2 session type for you to use this procedure.

Sample batch-mode DCU script

This is the sample batch-mode script (OpenEdge_Install/src/dynamics/install/dcubatch.bat) provided with Progress Dynamics for you to use as a guide for writing your own batch-mode DCU installation or upgrade procedure:

Sample batch-mode DCU script
@echo off 
SET DLC=c:\apps\progress\91e 
SET PATH=%DLC%;%DLC%\bin;%PATH% 
:CHECKPHASE1ERRFILE 
   echo Starting DCU Phase 1... 
   if exist dcuphase1err.txt goto DELPHASE1ERRFILE 
   goto PROCESSPHASE1 
:DELPHASE1ERRFILE 
   del dcuphase1err.txt 
:PROCESSPHASE1 
   SET DISPBANNER=no 
   call mbpro -b -p dcuphase1.p -ini dcubatch.ini -pf dcuphase1.pf  
   if exist dcuphase1err.txt goto PHASE1FAILED 
   echo DCU Upgrade Phase 1 Successful. 
   goto CHECKPHASE2ERRFILE 
:PHASE1FAILED 
  echo *** DCU Upgrade Phase 1 Failed. Please see log file for more 
information. 
  type dcuphase1err.txt 
  del dcuphase1err.txt 
  goto CLEANUP 
:CHECKPHASE2ERRFILE 
   echo Starting DCU Phase 2... 
   if exist dcuphase2err.txt goto DELPHASE2ERRFILE 
   goto PROCESSPHASE2 
:DELPHASE2ERRFILE 
   del dcuphase2err.txt 
:PROCESSPHASE2 
  SET DISPBANNER=no 
  call mbpro -b -p dcuphase2.p -ini dcubatch.ini -pf dcuphase2.pf  
  if exist dcuphase2err.txt goto PHASE2FAILED 
  echo DCU Upgrade Phase 2 Successful. 
  goto CLEANUP 
:PHASE2FAILED 
  echo *** DCU Upgrade Phase 2 Failed. Please see log file for more 
information. 
  type dcuphase2err.txt 
  del dcuphase2err.txt 
  goto CLEANUP 
   
:CLEANUP 
set DISPBANNER= 
:END 

The dcubatch.ini, dcuphase1.pf, and dcuphase2.pf files are also sample files provided with dcubatch.bat, which you can modify as appropriate. You must modify dcubatch.bat for the paths in your Windows environment and reworked to run in a UNIX environment.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095